package com.shr.codem;

import java.util.Scanner;

public class Compare2 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int count = sc.nextInt() ;
		
		int start = sc.nextInt() ;
		int sum = 1;
		for(int i = 0;i<count-1;i++){
			int num = sc.nextInt() ;
			if(num <= start)
				sum ++ ;
		}
		double k = Math.log(sum) / Math.log(2.0) ;
		System.out.println((int)k);
		sc.close();
	}
}
